from mediator import mediator
from mediator . tests . test_assistant import make_mediator_test_keyword_args

class clockwork_fake :
    def __init__ ( self ) :
        self . _current_time_request = False
    def current_time_request ( self ) :
        self . _current_time_request = True

class mediator_clockwork_tests : 
    'mediator_clockwork'
    def __init__ ( self , test ) :
        self . _test = test
        self . _clockwork = clockwork_fake ( )
        self . _mediator = mediator ( )
        self . _mediator . register_modules ( ** make_mediator_test_keyword_args \
            ( 'clockwork' 
            , self . _clockwork
            , None
            ) )
    def test_current_time_request ( self ) :
        self . _mediator . current_time_request ( )
        self . _test . assume_true ( self . _clockwork . _current_time_request )
